package com.zmn.plat.model.entity.part;

import com.zmn.common.utils.pager.Operator;

import java.util.Date;

/**
 * 类描述： PartSkuPrice实体
 *
 * @author DaiZhichao
 * @since 2018/10/23 16:16
 */

public class PartSkuPrice extends Operator {
    /**
     * 配件ID
     */
    private Integer skuId;

    /**
     * 总公司采购价格(统采)，单位：分
     */
    private Long hqPurchasePrice;

    /**
     * 分公司采购价格(统采)，单位：分
     */
    private Long subPurchasePrice;

    /**
     * 标准售价，单位：分
     */
    private Long price;

    /**
     * 创建人
     */
    private String creater;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public Long getHqPurchasePrice() {
        return hqPurchasePrice;
    }

    public void setHqPurchasePrice(Long hqPurchasePrice) {
        this.hqPurchasePrice = hqPurchasePrice;
    }

    public Long getSubPurchasePrice() {
        return subPurchasePrice;
    }

    public void setSubPurchasePrice(Long subPurchasePrice) {
        this.subPurchasePrice = subPurchasePrice;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PartSkuPrice other = (PartSkuPrice) that;
        return (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
            && (this.getHqPurchasePrice() == null ? other.getHqPurchasePrice() == null : this.getHqPurchasePrice().equals(other.getHqPurchasePrice()))
            && (this.getSubPurchasePrice() == null ? other.getSubPurchasePrice() == null : this.getSubPurchasePrice().equals(other.getSubPurchasePrice()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater()))
            && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
        result = prime * result + ((getHqPurchasePrice() == null) ? 0 : getHqPurchasePrice().hashCode());
        result = prime * result + ((getSubPurchasePrice() == null) ? 0 : getSubPurchasePrice().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", skuId=").append(skuId);
        sb.append(", hqPurchasePrice=").append(hqPurchasePrice);
        sb.append(", subPurchasePrice=").append(subPurchasePrice);
        sb.append(", price=").append(price);
        sb.append(", creater=").append(creater);
        sb.append(", updater=").append(updater);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    public PartSkuPrice(Integer skuId, Long hqPurchasePrice, Long subPurchasePrice, Long price, String creater, Date createTime) {
        this.skuId = skuId;
        this.hqPurchasePrice = hqPurchasePrice;
        this.subPurchasePrice = subPurchasePrice;
        this.price = price;
        this.creater = creater;
        this.createTime = createTime;
    }

    public PartSkuPrice() {
    }
}